import uuid
import json

id = str(uuid.uuid4())
# todo 去掉‘-’字符
id = id.replace('-', '')
print(id)
print(len(id))

m1 = {
    "name": "zhangsan",
    "age": 18
}

strs = json.dumps(m1)
print(strs)
# todo 数据写入文件
with open("./data.json", "w") as f:
    f.write(strs)

# todo 判断一个变量为class
class User:
    def __init__(self, name, age):
        self.name = name
        self.age = age

u = User("zhangsan", 18)
print(type(u))

